package org.yohann.ai.tool;

import lombok.AllArgsConstructor;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.yohann.ai.annotation.Tools;
import org.yohann.ai.pojo.PagePath;
import org.yohann.ai.service.PagePathService;
import org.yohann.ai.tool.base.BaseTools;

import java.util.List;

@Tools
@AllArgsConstructor
public class PagePathTools implements BaseTools {

    private final PagePathService service;

    @Tool(description = "获取全部页面列表")
    public List<PagePath> getAllPageList() {
        return service.getAllPageList();
    }


    @Tool(description = "获取用户浏览日志")
    public List<String> getUserViewLog(@ToolParam(description = "用户id") String userId) {
        return service.getUserViewLog(userId);
    }
}
